package com.it.selfAfter.utils;

import java.util.Random;

public class UtilsRandomUsername {
    private static final String CHARACTERS = "abcdefghijklmnopqrstuvwxyz";
    private static final int USERNAME_LENGTH = 8; // 用户名长度

    public static String generateUsername() {
        Random random = new Random();
        StringBuilder usernameBuilder = new StringBuilder();
        for (int i = 0; i < USERNAME_LENGTH; i++) {
            int index = random.nextInt(CHARACTERS.length());
            usernameBuilder.append(CHARACTERS.charAt(index));
        }
        return "CQ_" + usernameBuilder.toString();
    }
    public static String getInitImg(){
        return "/usr/local/web/images/selfProject/Login.gif";
    }
}
